<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 给你一个 非空 整数数组 nums ，除了某个元素只出现一次以外，
        // 其余每个元素均出现两次。找出那个只出现了一次的元素。
        const arr = [11, 88, 55, 99, 44, 55, 88, 77, 44, 11, 22, 55, 99,]
        const newArr = {}
        arr.map(item => {
            if (newArr[item]) {
                newArr[item] = +1
            } else {
                newArr[item] = 1
            }
        })
        console.log(newArr);
    </script>
</body>

</html>